Linux time zone details and common time functions time and time zone The entire earth is divided into 24 time zones, each time zone has its own local time. ø UTC Time and GMT time We can think of Greenwich Mean Time (GMT = UTC), GMT and
Date and Time functionsThis chapter discusses some functions that can be used to manipulate time values. See section 11.3, "Date and Time type" for valid formats for each time and date type with a range and a specified value.
The following example
Transfer from http://blog.sina.com.cn/s/blog_6d39dc6f0100m7eo.html1.1 Get the current date + time (date + times) function: Now ()In addition to the now () function to get the current datetime, MySQL has the following function:Current_timestamp ()
MySQL obtains the bitsCN of the current date and time (and converts the time. com1.1 obtain the current date + time (date + time) function: in addition to the now () function to obtain the current date and time, MySQL also has the following function:
Localtimestamp () LocaltimestampThese date-time functions are equivalent to now (). Since the now () function is short and easy to remember, it is recommended that you always use now () instead of the functions listed above.1.2 Get the current date +
1.1 Get the current date + time (date + times) function: Now ()In addition to the now () function to get the current date time, MySQL has the following functionCurrent_timestamp () current_timestampLocalTime () localtimeLocaltimestamp ()
1.1 Get the current date + time (date + times) function: Now ()In addition to the now () function to get the current datetime, MySQL has the following function:Current_timestamp () Current_timestampLocalTime () localtimeLocaltimestamp ()
1.1 Get the current date + time (date + times) function: Now ()In addition to the now () function to get the current datetime, MySQL has the following function:Current_timestamp () Current_timestampLocalTime () localtimeLocaltimestamp ()
MySQL date data type and time type usage summary MySQL date type: Date format, storage space occupied, date range comparison.
Date type storage space date format date range
-----------------------------------------------------------------------------
MySQL date type: Date Format, storage space occupied, and date range comparison.Date type storage space date format date range-----------------------------------------------------------------------------------Datetime 8 bytes YYYY-MM-DD hh: mm: SS 10
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.